package com.ruoyi.market.domain;

import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import javax.validation.constraints.NotBlank;

/**
 * 单位对象 unit
 * 
 * @author ruoyi
 */
public class Unit extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 单位ID */
    private Long unitId;

    /** 店铺ID */
    private String shopId;

    /** 排序 */
    @Excel(name = "排序")
    private Long unitSort;

    /** 单位标题 */
    @Excel(name = "单位标题")
    private String unitTitle;

    /** 删除标志（0代表存在 2代表删除） */
    private String delFlag;

    /** 所属店铺信息   */
    private ConfigBase shopInfo;

    public Unit()
    {

    }

    public Unit(Long unitId)
    {
        this.unitId = unitId;
    }

    public Long getUnitId()
    {
        return unitId;
    }

    public void setUnitId(Long unitId)
    {
        this.unitId = unitId;
    }

    public String getShopId(){ return shopId; }

    public void setShopId(String shopId){ this.shopId = shopId; }

    @NotBlank(message = "名称不能为空")
    public String getUnitTitle(){ return unitTitle;}

    public void setUnitTitle(String unitTitle){ this.unitTitle = unitTitle; }

    public Long getUnitSort(){ return unitSort;}

    public void setUnitSort(Long unitSort){ this.unitSort = unitSort; }

    public String getDelFlag()
    {
        return delFlag;
    }

    public void setDelFlag(String delFlag)
    {
        this.delFlag = delFlag;
    }

    public ConfigBase getShopInfo()
    {
        return shopInfo;
    }

    public void setShopInfo(ConfigBase shopInfo)
    {
        this.shopInfo = shopInfo;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("unitId", getUnitId())
            .append("shopId", getShopId())
            .append("unitTitle", getUnitTitle())
            .append("unitSort", getUnitSort())
            .append("delFlag", getDelFlag())
            .append("shopInfo", getShopInfo())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("remark", getRemark())
            .toString();
    }
}
